﻿@using ECG.Utility
@using ECG.WebUI.CustomHelpers
@using ECG.WebUI.Models
@model List<ECG.Common.ProductRateByCateTopListPagingDto>
@{
    if (Model.Any())
    {
        <ul class="pp1-list-p3 clearfix">
            @foreach (var item in Model)
            {
                var pDetailLink = Url.Action("Index", "ProductDetail", new { productId = item.Id, productName = StringUtil.RemoveSpecialCharactersVn(item.Name) });
                <li>
                    <a href="@pDetailLink" title="@item.Name">
                        <div class="pp1-img">
                            <img src="@item.ImagePath.ImagePathThumb(150, 150)" width="150" height="150" alt="@item.Name" class="lzLoading" />
                        </div>
                        <div class="pp1-name">
                            <h2>@item.Name</h2>
                        </div>
                        @if (item.PromotionPrice > 0)
                        {
                            <div class="pp1-price-thro">@item.Price.ToString("##,###,###") đ</div>
                            <div class="pp1-price">@item.PromotionPrice.ToString("##,###,###") đ</div>
                        }
                        else
                        {
                            <div class="pp1-price">@item.Price.ToString("##,###,###") đ</div>
                        }
                    </a>
                </li>
            }
        </ul>
    
    <!--PHAN TRANG SAN PHAM-->
    <div class="clearfix" style="width: 100%;">
        <div class="bb_pagging ">
            @Html.PageLinksOnProductListCatePage((PageInfo)ViewBag.PageInfo, i => Url.Action("Index", "CategoryL3", new { page = i }))
        </div>
    </div>
    <!--END PHAN TRANG SAN PHAM-->
    }
}